package no.jschief.lupercal.poc.waypointing.los;

import java.util.ArrayList;

import no.jschief.lupercal.poc.waypointing.GeoFactory;
import no.jschief.lupercal.poc.waypointing.WaypointDiscovery;

import com.jme3.math.ColorRGBA;
import com.jme3.math.Vector3f;
import com.jme3.scene.Geometry;

public class LosManager {
	WaypointDiscovery wd;
	ArrayList<Waypoint> wpList;

	public LosManager(WaypointDiscovery wd) {
		this.wd = wd;
		wpList = new ArrayList<Waypoint>();
	}
	
	public void addWaypoint(Vector3f wpLocation) {
		System.out.println("New permaWP: " + wpLocation.toString() );
		Geometry wpGeo = GeoFactory.createDebugMark(this.wd.getAssetManager(), ColorRGBA.Magenta);
		wpGeo.setLocalTranslation( wpLocation );
		wd.getRootNode().attachChild( wpGeo );
		
		wpList.add( new Waypoint( wpLocation ) );
	}
	
}
